home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / asm / demos / coppergelly / 3dstarsjoyfixed.s next >
Text File  |  1980-01-03  |  13KB  |  648 lines

  1.  
  2. PlaneHeight    = 255
  3. PlaneWidth    = 40
  4. PlaneLen    = PlaneHeight*PlaneWidth
  5. PL        = PlaneLen
  6. PlaneBLTSIZE    = 3*PlaneHeight*64+(PlaneWidth/2)
  7. MaxTiefe    = $2000
  8. StarCount    = 335
  9. X        = 160
  10. Y        = 128
  11. Z        = 256
  12. ClipX        = 319
  13. ClipY        = 254
  14. JoySpeed    = 5
  15.  
  16. ***************************************************
  17. *** MACRO-Definition                ***
  18. ***************************************************
  19.  
  20. WAITBLITT:    MACRO
  21.         btst    #6,$02(a6)
  22. .\@:        btst    #6,$02(a6)
  23.         bne.s    .\@
  24.         ENDM
  25.  
  26. ***************************************************
  27. *** ProgrammStart                ***
  28. ***************************************************
  29.  
  30. Kill_OS:    move.l    (AbsExecBase).w,a6    ; get execbase
  31.         lea    Gfxlib(pc),a1        ; point to graphics.library
  32.         jsr    OldOpenLibrary(a6)    ; open graphics library
  33.         move.l     d0,Gfxbase        ; save gfxbase address
  34.         jsr    Forbid(a6)        ; () turn off multitasking
  35.         lea    (_Custom).l,a6        ; custom base address in a6
  36.         move.w    dmaconr(a6),dmasav    ; save dma
  37.         move.w    intenar(a6),intsav    ; save intena
  38.         move.w    adkconr(a6),adksav    ; save adkcon
  39.         move.w    #$7fff,intena(a6)    ; turn off intena
  40.  
  41.         bsr    RandomStars
  42.         bsr.s    CalcTab
  43.         bsr.w    MakePerspTab
  44.  
  45.         move.l  #Copperlist,cop1lch(a6)    ; install custom copperlist
  46.         clr.w    copjmp1(a6)        ; clear second copperlist
  47.         move.w    #$c020,intena(a6)    ; return INTENA:
  48.         move.w  #$87c0,dmacon(a6)    ; return DMA:Cop/Blit/Sprite
  49.  
  50.         bsr    Main
  51.  
  52. Help_OS:    lea    (_Custom).l,a6        ; custom base address in a6
  53.         move.l    GFXbase(pc),a1        ; get gfxbase in a1
  54.         move.l    SysCop1(a1),cop1lch(a6)    ; restore old system copper
  55.         move.w    dmasav,d0        ; get saved dma value
  56.         or.w    #$8000,d0
  57.         move.w    d0,dmacon(a6)        ; restore old dma
  58.         move.w    adksav,d0        ; get saved adkcon value
  59.         or.w    #$8000,d0
  60.         move.w    d0,adkcon(a6)        ; restore old adkcon
  61.         move.w    intsav,d0        ; get saved intena value
  62.         or.w    #$8000,d0
  63.         move.w    d0,intena(a6)        ; restore old interna
  64.         move.l    (AbsExecBase).w,a6    ; get execbase
  65.         jsr    Permit(a6)        ; permit multitasking
  66.         move.l    GFXbase(pc),a1        ; get gfxbase in a1
  67.         jsr    CloseLibrary(a6)    ; close gfx library
  68.         moveq.l    #0,d0            ; no cli return code
  69.         rts
  70.  
  71. ***************************************************
  72. *** Build Y Table                ***
  73. ***************************************************
  74.  
  75. CalcTab:    lea    YTab(pc),a0
  76.         moveq    #0,d0
  77.         move.w    #PlaneHeight-1,d7
  78. .Loop:        move.w    d0,(a0)+
  79.         add.w    #PlaneWidth,d0
  80.         dbra    d7,.Loop
  81.         rts
  82.  
  83. ***************************************************
  84. *** Build Division Table            ***
  85. ***************************************************
  86.  
  87. MakePerspTab:    lea    PerspTab,a1
  88.         move.w    #Z,d0
  89.         add.w    d0,a1
  90.         add.w    d0,a1
  91.         move.w    #Z,d2
  92.         mulu    #$7fff,d2
  93. .Loop:        move.l    d2,d1
  94.         divu    d0,d1
  95.         move.w    d1,(a1)+
  96.         addq.w    #1,d0
  97.         cmp.w    #MaxTiefe,d0
  98.         bne.s    .Loop
  99.         rts
  100.  
  101. ***************************************************
  102. *** Random Stars                ***
  103. ***************************************************
  104.  
  105. RandomStars:    lea    StarDatas,a0
  106.         move.w    #$1fff,d3
  107.         move.w    #StarCount-1,d7
  108.  
  109. .Loop:        bsr.s    GetWord            ;X Word
  110.         add.w    #X,d2
  111.         and.w    d3,d2
  112.         sub.w    #X,d2
  113.         move.w    d2,(a0)+
  114.         bsr.s    GetWord            ;Y Word
  115.         add.w    #Y,d2
  116.         and.w    d3,d2
  117.         sub.w    #Y,d2
  118.         move.w    d2,(a0)+
  119.         bsr.s    GetWord            ;Z Word
  120.         add.w    #Z,d2
  121.         and.w    d3,d2
  122.         sub.w    #Z,d2
  123.         move.w    d2,(a0)+
  124.         dbf    d7,.Loop
  125.         rts
  126.  
  127. GetWord:    bsr.s    GetByte
  128.         move.b    d0,d2
  129.         lsl.w    #8,d2
  130.         bsr.s    GetByte
  131.         move.b    d0,d2
  132.         rts
  133.  
  134. GetByte:    move.b    $dff007,d0
  135.         move.b    $bfd800,d1
  136.         eor.b    d1,d0
  137.         moveq    #0,d1
  138.         move.b    d0,d1
  139.         ror.b    #1,d1
  140. .loop:        dbf    d1,.loop
  141.         rts
  142.  
  143. ***************************************************
  144. *** Main Loop                    ***
  145. ***************************************************
  146.  
  147. Main:        btst    #10,$16(a6)
  148.         beq.s    Main
  149.         move.l    $04(a6),d0
  150.         and.l    #$1ff00,d0
  151.         cmp.l    #300*256,d0
  152.         bne.s    Main
  153.  
  154.         bsr    ClearPlane
  155.         bsr    JoyControl
  156.         bsr.s    New3DStars
  157.         lea    $dff000,a6
  158.         bsr    ChangePlanes
  159.  
  160.         move.w    #$444,$180(a6)
  161.         moveq    #20,d7
  162. .Loop:        dbra    d7,.Loop
  163.         move.w    #$000,$180(a6)
  164.  
  165.         btst    #6,$bfe001
  166.         bne.s    Main
  167.         WAITBLITT
  168.         rts
  169.  
  170. ***************************************************
  171. *** 3D Star Routine                ***
  172. ***************************************************
  173.  
  174. New3DStars:    move.w    #StarCount-1,d7        ;64 Stars
  175.         lea    StarDatas,a0        ;Ptr StarDatas
  176.         lea    PerspTab,a1        ;Projection Table
  177.         movem.w    XAdd(pc),a4-a6        ;Put coordinate adds in regs
  178.         move.w    #ClipX,a3        ;Clipping constante
  179.         move.w    #ClipY,d5
  180.         move.w    #$1fff,d3
  181.         move.w    #$1000,d4        ;middle value
  182.         add.w    d4,a4            ;+x add
  183.         add.w    d4,a5            ;+y add
  184.  
  185. .Loop:        movem.w    (a0),d0-d2        ;Get coordinate
  186.  
  187.         add.w    a4,d0            ;add middle and de/increase x
  188.         and.w    d3,d0            ;check overflow
  189.         sub.w    d4,d0            ;sub middle
  190.         add.w    a5,d1            ;add middle and de/increase y
  191.         and.w    d3,d1            ;check overflow
  192.         sub.w    d4,d1            ;sub middle
  193.         add.w    a6,d2            ;de/increase z
  194.         and.w    d3,d2            ;check overflow
  195.  
  196.         movem.w    d0-d2,(a0)        ;save coords
  197.         addq.w    #6,a0            ;(there is no movem.w d0,(a0)+)
  198.  
  199. ; >--- Projection, vlipping und plot
  200. ;/
  201.  
  202. .SetStar:    cmp.w    #Z,d2            ;z<d2?
  203.         blt.s    .Next            ;-> Next star
  204.         add.w    d2,d2            ;Z*2
  205.         move.w    (a1,d2.w),d6        ;Projektionswert holen
  206.  
  207. ;It's very important to do the following commands in this order. It's very
  208. ;stupid of you do it like this:
  209. ;            muls    d6,d0
  210. ;            muls    d6,d1
  211. ;            swap    d0
  212. ;            swap    d1
  213. ;            etc...
  214. ;Ok, the source looks better but there is one BIG disadvantage!!! If e.g.
  215. ;the x value isn't in the screen you don't have the plot this pixel. But
  216. ;if the pixel musn't be plot it is really stupid to check/calculate the
  217. ;y value!!! Understood??? The following routine is much better! It first
  218. ;checks if the x value is within the screen. If it is, the y value will be
  219. ;calculated. If not, the y value won't be calculated (We can't save the
  220. ;unneccessary 'muls d6,d1' in this case!!!
  221.  
  222.         muls    d6,d0            ;projection
  223.         swap    d0            ;
  224.         add.w    #X,d0            ;X middle of screen (160)
  225.         cmp.w    a3,d0            ;a3=ClipX (Clipping)
  226.         bhi.s    .Next            ;Don't plot
  227.  
  228.         muls    d6,d1            ;projection
  229.         swap    d1
  230.         add.w    #Y,d1            ;Y middle of screen (128)
  231.         cmp.w    d5,d1            ;a4=ClipY
  232.         bhi.s    .Next            ;Don't plot
  233.  
  234.         move.l    WorkPlane(pc),a2    ;plot pixel
  235.         move.w    d0,d6
  236.         lsr.w    #3,d6
  237.         add.w    d6,a2
  238.         add.w    d1,d1
  239.         add.w    YTab(pc,d1.w),a2
  240.         not.w    d0
  241.  
  242.         rol.w    #6,d2            ;get color
  243.         and.w    #$e,d2
  244.         move.w    .JT(pc,d2.w),d2
  245.         jmp    .JT(pc,d2.w)
  246.  
  247. .JT:        dc.w    .r6-.JT,.r6-.JT,.r5-.JT,.r4-.JT
  248.         dc.w    .r3-.JT,.r2-.JT,.r1-.JT,.r0-.JT
  249.  
  250. .r0:        bset    d0,(a2)            ;plot routines...
  251. .next:        dbf    d7,.Loop
  252.         rts
  253. .r1:        bset    d0,PL(a2)
  254.         dbf    d7,.Loop
  255.         rts
  256. .r2:        bset    d0,(a2)
  257.         bset    d0,PL(a2)
  258.         dbf    d7,.Loop
  259.         rts
  260. .r3:        bset    d0,PL*2(a2)
  261.         dbf    d7,.Loop
  262.         rts
  263. .r4:        bset    d0,(a2)
  264.         bset    d0,PL*2(a2)
  265.         dbf    d7,.Loop
  266.         rts
  267. .r5:        bset    d0,PL(a2)
  268.         bset    d0,PL*2(a2)
  269.         dbf    d7,.Loop
  270.         rts
  271. .r6:        bset    d0,(a2)
  272.         bset    d0,PL(a2)
  273.         bset    d0,PL*2(a2)
  274.         dbf    d7,.Loop
  275.         rts
  276.  
  277. XAdd:        dc.w    0
  278. YAdd:        dc.w    0
  279. ZAdd:        dc.w    -100
  280.  
  281. YTab:        ds.w    PlaneHeight
  282.  
  283. ***************************************************
  284. *** Joystick Control                ***
  285. ***************************************************
  286.  
  287. JoyControl:    lea    XAdd(pc),a0
  288.         lea    ZAdd(pc),a1
  289.         tst.b    $bfe001            ;Y or Z?
  290.         bpl.s    .Pressed        ;Z-> Pressed
  291.  
  292.         lea    YAdd(pc),a1        ;otherwise Y
  293.  
  294. .Pressed:    move.w    $0c(a6),d0
  295.         btst    #1,d0
  296.         beq.s    .TstLinks
  297.         subq.w    #JoySpeed,(a0)
  298.         bra.s    .DoY
  299. .TstLinks:    btst    #9,d0
  300.         beq.s    .DoY
  301.         addq.w    #JoySpeed,(a0)
  302.  
  303. .DoY:        move.w    d0,d1
  304.         lsr.w    #1,d1
  305.         eor.w    d0,d1
  306.         btst    #0,d1
  307.         beq.s    .TstVorne
  308.         addq.w    #JoySpeed,(a1)
  309.         bra.s    .Exit
  310. .TstVorne:    btst    #8,d1
  311.         beq.s    .Exit
  312.         subq.w    #JoySpeed,(a1)
  313. .Exit:        rts
  314.  
  315. ***************************************************
  316. *** clear DelPlane                ***
  317. ***************************************************
  318.  
  319. ClearPlane:    WAITBLITT
  320.  
  321.         move.l    DelPlane(pc),$54(a6)
  322.         clr.w    $66(a6)
  323.         move.l    #$01000000,$40(a6)
  324.         move.w    #PlaneBLTSIZE,$58(a6)
  325.         rts
  326.  
  327. ***************************************************
  328. *** Tripple Buffering                ***
  329. ***************************************************
  330.  
  331. ChangePlanes:    lea    Plane(pc),a0
  332.         movem.l    (a0),d0-d2
  333.         exg    d0,d1
  334.         exg    d1,d2
  335.         movem.l    d0-d2,(a0)
  336.         lea    PlanePtrs(pc),a0
  337.         move.w    d0,6(a0)
  338.         swap    d0
  339.         move.w    d0,2(a0)
  340.         swap    d0
  341.         add.l    #PlaneLen,d0
  342.         move.w    d0,6+8(a0)
  343.         swap    d0
  344.         move.w    d0,2+8(a0)
  345.         swap    d0
  346.         add.l    #PlaneLen,d0
  347.         move.w    d0,6+16(a0)
  348.         swap    d0
  349.         move.w    d0,2+16(a0)
  350.         swap    d0
  351.         rts
  352.  
  353. Plane:        dc.l    Plane1
  354. WorkPlane:    dc.l    Plane2
  355. DelPlane:    dc.l    Plane3
  356.  
  357. ***************************************************
  358. *** Datas                    ***
  359. ***************************************************
  360.  
  361. * Try Germany/0+$4498a7c!!! (Ask for Karsten!)
  362.  
  363. Copperlist:    dc.l    $01200000,$01220000,$01240000,$01260000
  364.         dc.l    $01280000,$012a0000,$012c0000,$012e0000
  365.         dc.l    $01300000,$01320000,$01340000,$01360000
  366.         dc.l    $01380000,$013a0000,$013c0000,$013e0000
  367.  
  368.         dc.l    $008e2c81,$00902bc1,$00920038,$009400d0
  369.         dc.l    $01020000,$01040000,$01080000,$010a0000
  370.         dc.l    $01000200,$01060000,$01fc0000
  371.  
  372. PlanePtrs:    dc.l    $00e00000,$00e20000,$00e40000,$00e60000
  373.         dc.l    $00e80000,$00ea0000
  374.         dc.l    $01003200
  375.  
  376.         dc.l    $01800000,$01820333,$01840555,$01860777
  377.         dc.l    $01880999,$018a0bbb,$018c0ddd,$018e0fff
  378.         dc.l    -2
  379.  
  380.  
  381. dmasav:        dc.w    0
  382. adksav:        dc.w    0
  383. intsav:        dc.w    0
  384. GFXlib:        dc.b    "graphics.library"
  385.         even
  386. GFXBase:    ds.l    2
  387.         even
  388.  
  389.         section    b,bss_c
  390. Plane1:        ds.b    PlaneLen*3
  391. Plane2:        ds.b    PlaneLen*3
  392. Plane3:        ds.b    PlaneLen*3
  393. PerspTab:    ds.w    MaxTiefe
  394. StarDatas:    ds.w    StarCount*3
  395.  
  396. Level3Vector    equ $6c
  397. SysCop1        equ $26
  398. _ciaa:        equ $bfe001
  399. _ciab:        equ $bfd000
  400. left        equ 6
  401.  
  402. _custom:    equ $dff000
  403. bltddat:    equ $000
  404. dmaconr:    equ $002
  405. vposr:        equ $004
  406. vhposr:        equ $006
  407. dskdatr:    equ $008
  408. joy0dat:    equ $00a
  409. joy1dat:    equ $00c
  410. clxdat:        equ $00e
  411. adkconr:    equ $010
  412. pot0dat:    equ $012
  413. pot1dat:    equ $014
  414. potgor:        equ $016
  415. serdatr:    equ $018
  416. dskbytr:    equ $01a
  417. intenar:    equ $01c
  418. intreqr:    equ $01e
  419. dskpth:        equ $020
  420. dskptl:        equ $022
  421. dsklen:        equ $024
  422. dskdat:        equ $026
  423. refptr:        equ $028
  424. vposw:        equ $02a
  425. vhposw:        equ $02c
  426. copcon:        equ $02e
  427. serdat:        equ $030
  428. serper:        equ $032
  429. potgo:        equ $034
  430. joytest:    equ $036
  431. strequ:        equ $038
  432. strvbl:        equ $03a
  433. strhor:        equ $03c
  434. strlong:    equ $03e
  435. bltcon0:    equ $040
  436. bltcon1:    equ $042
  437. bltafwm:    equ $044
  438. bltalwm:    equ $046
  439. bltcpth:    equ $048
  440. bltcptl:    equ $04a
  441. bltbpth:    equ $04c
  442. bltbptl:    equ $04e
  443. bltapth:    equ $050
  444. bltaptl:    equ $052
  445. bltdpth:    equ $054
  446. bltdptl:    equ $056
  447. bltsize:    equ $058
  448. bltcmod:    equ $060
  449. bltbmod:    equ $062
  450. bltamod:    equ $064
  451. bltdmod:    equ $066
  452. bltcdat:    equ $070
  453. bltbdat:    equ $072
  454. bltadat:    equ $074
  455. dsksync:    equ $07e
  456. cop1lch:    equ $080
  457. cop1lcl:    equ $082
  458. cop2lch:    equ $084
  459. cop2lcl:    equ $086
  460. copjmp1:    equ $088
  461. copjmp2:    equ $08a
  462. copins:        equ $08c
  463. diwstrt:    equ $08e
  464. diwstop:    equ $090
  465. ddfstrt:    equ $092
  466. ddfstop:    equ $094
  467. dmacon:        equ $096
  468. clxcon:        equ $098
  469. intena:        equ $09a
  470. intreq:        equ $09c
  471. adkcon:        equ $09e
  472. aud0pth:    equ $0a0
  473. aud0ptl:    equ $0a2
  474. aud0len:    equ $0a4
  475. aud0per:    equ $0a6
  476. aud0vol:    equ $0a8
  477. aud0dat:    equ $0aa
  478. aud1pth:    equ $0b0
  479. aud1ptl:    equ $0b2
  480. aud1len:    equ $0b4
  481. aud1per:    equ $0b6
  482. aud1vol:    equ $0b8
  483. aud1dat:    equ $0ba
  484. aud2pth:    equ $0c0
  485. aud2ptl:    equ $0c2
  486. aud2len:    equ $0c4
  487. aud2per:    equ $0c6
  488. aud2vol:    equ $0c8
  489. aud2dat:    equ $0ca
  490. aud3pth:    equ $0d0
  491. aud3ptl:    equ $0d2
  492. aud3len:    equ $0d4
  493. aud3per:    equ $0d6
  494. aud3vol:    equ $0d8
  495. aud3dat:    equ $0da
  496. bpl1pth:    equ $0e0
  497. bpl1ptl:    equ $0e2
  498. bpl2pth:    equ $0e4
  499. bpl2ptl:    equ $0e6
  500. bpl3pth:    equ $0e8
  501. bpl3ptl:    equ $0ea
  502. bpl4pth:    equ $0ec
  503. bpl4ptl:    equ $0ee
  504. bpl5pth:    equ $0f0
  505. bpl5ptl:    equ $0f2
  506. bpl6pth:    equ $0f4
  507. bpl6ptl:    equ $0f6
  508. bplcon0:    equ $100
  509. bplcon1:    equ $102
  510. bplcon2:    equ $104
  511. bpl1mod:    equ $108
  512. bpl2mod:    equ $10a
  513. bpl1dat:    equ $110
  514. bpl2dat:    equ $112
  515. bpl3dat:    equ $114
  516. bpl4dat:    equ $116
  517. bpl5dat:    equ $118
  518. bpl6dat:    equ $11a
  519. spr0pth:    equ $120
  520. spr0ptl:    equ $122
  521. spr1pth:    equ $124
  522. spr1ptl:    equ $126
  523. spr2pth:    equ $128
  524. spr2ptl:    equ $12a
  525. spr3pth:    equ $12c
  526. spr3ptl:    equ $12e
  527. spr4pth:    equ $130
  528. spr4ptl:    equ $132
  529. spr5pth:    equ $134
  530. spr5ptl:    equ $136
  531. spr6pth:    equ $138
  532. spr6ptl:    equ $13a
  533. spr7pth:    equ $13c
  534. spr7ptl:    equ $13e
  535. spr0pos:    equ $140
  536. spr0ctl:    equ $142
  537. spr0data:    equ $144
  538. spr0datb:    equ $146
  539. spr1pos:    equ $148
  540. spr1ctl:    equ $14a
  541. spr1data:    equ $14c
  542. spr1datb:    equ $14e
  543. spr2pos:    equ $150
  544. spr2ctl:    equ $152
  545. spr2data:    equ $154
  546. spr2datb:    equ $156
  547. spr3pos:    equ $158
  548. spr3ctl:    equ $15a
  549. spr3data:    equ $15c
  550. spr3datb:    equ $15e
  551. spr4pos:    equ $160
  552. spr4ctl:    equ $162
  553. spr4data:    equ $164
  554. spr4datb:    equ $166
  555. spr5pos:    equ $168
  556. spr5ctl:    equ $16a
  557. spr5data:    equ $16c
  558. spr5datb:    equ $16e
  559. spr6pos:    equ $170
  560. spr6ctl:    equ $172
  561. spr6data:    equ $174
  562. spr6datb:    equ $176
  563. spr7pos:    equ $178
  564. spr7ctl:    equ $17a
  565. spr7data:    equ $17c
  566. spr7datb:    equ $17e
  567. color00:    equ $180
  568. color01:    equ $182
  569. color02:    equ $184
  570. color03:    equ $186
  571. color04:    equ $188
  572. color05:    equ $18a
  573. color06:    equ $18c
  574. color07:    equ $18e
  575. color08:    equ $190
  576. color09:    equ $192
  577. color10:    equ $194
  578. color11:    equ $196
  579. color12:    equ $198
  580. color13:    equ $19a
  581. color14:    equ $19c
  582. color15:    equ $19e
  583. color16:    equ $1a0
  584. color17:    equ $1a2
  585. color18:    equ $1a4
  586. color19:    equ $1a6
  587. color20:    equ $1a8
  588. color21:    equ $1aa
  589. color22:    equ $1ac
  590. color23:    equ $1ae
  591. color24:    equ $1b0
  592. color25:    equ $1b2
  593. color26:    equ $1b4
  594. color27:    equ $1b6
  595. color28:    equ $1b8
  596. color29:    equ $1ba
  597. color30:    equ $1bc
  598. color31:    equ $1be
  599. open:        equ -30
  600. close:        equ -36
  601. read:        equ -42
  602. write:        equ -48
  603. input:        equ -54
  604. output:        equ -60
  605. seek:        equ -66
  606. deletefile:    equ -72
  607. rename:        equ -78
  608. lock:        equ -84
  609. unlock:        equ -90
  610. duplock:    equ -96
  611. examine:    equ -102
  612. exnext:        equ -108
  613. info:        equ -114
  614. createdir:    equ -120
  615. currentdir:    equ -126
  616. ioErr:        equ -132
  617. CreateProc:    equ -138
  618. exit:        equ -144
  619. loadseg:    equ -150
  620. unloadseg:    equ -156
  621. getpacket:    equ -162
  622. queupacket:    equ -168
  623. deviceproc:    equ -174
  624. setcomment:    equ -180
  625. setprotection:    equ -186
  626. datestamp:    equ -192
  627. delay:        equ -198
  628. waitforchar:    equ -204
  629. parentdir:    equ -210
  630. IsInteractive:    equ -216
  631. Execute:    equ -222
  632.  
  633. AbsExecBase:    equ 4
  634. forbid        equ -132
  635. permit        equ -138
  636. allocmem:    equ -198
  637. freemem:    equ -210
  638. getmsg:        equ -372
  639. replymsg:    equ -378
  640. waitport:    equ -384
  641. closelibrary:    equ -414
  642. opendevice:    equ -444
  643. closedevice:    equ -450
  644. doio:        equ -456
  645. oldopenlibrary    equ -408
  646. openlibrary:    equ -552
  647.  
  648.